﻿<div id="news">
<h4> Thông Báo </h4>
</div>
<?php
$limit=3;
$total=count($sp);
$current=$dp->PageCurrent();
$dau=$dp->FirstRecord($current,$limit);
$cuoi=$dp->LastRecord($current,$limit,$total);
for($i=$dau;$i<=$cuoi;$i++)
{
	$id=$sp[$i]['id'];

	$title=$sp[$i]['title'];
	$datepost=$sp[$i]['datepost'];
	$image=$sp[$i]['image'];
	$summany=$sp[$i]['summany'];
	$link="index.php?option=thongbao";
	if(isset($_REQUEST['idcat']))
	{
		$iscat=$_REQUEST['idcat'];
		$link.="&idcat=$idcat";
	}
	if(isset($_REQUEST['subcat']))
	{
		$subcat=$_REQUEST['subcat'];
		$link.="&subcat=$subcat";
	}
	$url=$link;
	$link.="&id=$id";
	$image="../hoctap/images/thongbao/".$sp[$i]['image'];
	
	
?>

	
			<div ="phanmem12">
	 
	  <div id ="pm">
	  <div id="hinh">
			<img src="<?php echo $image;?>" width="50px" height="50px"/>
			</div>
			<a class=titte2 href="<?php echo $link;?> "> -- <?php echo $title; ?></a><br>
			<div id = "date">
		   <i>Ngày Đăng :<?php echo $datepost;?></i>
		   </div>
			<?php echo $summany;?> 
		<div id ="chitiet">
		   <a href="<?php echo $link;?> "> Xem Thêm >> </a>
		 </div>
	</div>
	</div><br><br>
         <?php
   }
?>

<div id="phantrang">
<h4><?php echo $dp->Pagination($total, $current, $limit, $url);?></h4>
</div>
